cmake_minimum_required(VERSION 3.0)

project(robot)

aux_source_directory(src SRC)
aux_source_directory(src/impl IMPL)
add_library(${PROJECT_NAME} ${SRC} ${IMPL})
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_11)

aux_source_directory(test TEST)
add_executable(test_${PROJECT_NAME} ${TEST})
target_include_directories(test_${PROJECT_NAME} PRIVATE src)
target_link_libraries(test_${PROJECT_NAME} PRIVATE ${PROJECT_NAME})

enable_testing()
add_test(NAME test COMMAND test_${PROJECT_NAME})